FROM greencloudcomputing/nodejs14 AS web_builder
WORKDIR /build
COPY ./ .
RUN cd /build &&  npm --registry https://registry.npm.taobao.org install && npm run build 

FROM nginx:stable-alpine
LABEL Dockerfile="liuyang@umxwe.com"
RUN apk add --repository  https://mirrors.aliyun.com/alpine/v3.4/main/ --update curl && rm -rf /var/cache/apk/*
COPY docker/nginx.conf /etc/nginx/nginx.conf
COPY --from=web_builder /build/dist /usr/share/nginx/html/
